QuickTime 3 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Structure of an Input Map

The input map contains a set of atoms that refer to the tracks used in the effect. These are known as the track reference atoms . Each track is represented by one QTAtom of type kTrackModifierInput . The ID of the reference atom is set to the reference index of the track being used as the source: you generate the reference index by calling AddTrackReference on the track to be indexed.

Each reference atom contains two children, which hold the name and type of the source. The name of the track is a unique identifier that you provide, which is used in the effect description to reference the track. Any four-character name is valid, as long as it is unique in the set of source names.

Important
Apple recommends you adopt the standard naming convention 'srcX' , where X is a letter of the alphabet. Thus, your first source would be named 'srcA ', the second 'srcB' and so forth. This convention is used in this chapter.

The type of a reference atom indicates the type of the track being referenced. For a video track the type is VideoMediaType , for a sprite track it is SpriteMediaType , and so forth. Video tracks are likely to be the most common track type used as sources for effects. Only tracks that are media tracks and have a visible component, such as video and sprite tracks, can be used as sources for an effect. This means, for example, that sound tracks cannot be sources to an effect.

Figure 8 shows a completed input map that references two sources. The first source is a video track, and is called 'srcA' . The second source, also a video track, is called 'srcB' . The ID numbers of the two reference atoms are the reference index numbers returned by the call to AddTrackReference .

Figure 8 An example input map referencing two sources


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |